package com.mi.rof.entity.enums;

/**
 * @author zwq yyy
 */
public enum ExceptionEnum {
    /**
     * 用户登录
     */
    USER_NOT_EXIST("999","用户不存在"),
    NO_LOGIN("998","未登录"),
    NO_AUTH("997","无权限"),
    TOKEN_EXPIRED("996","token过期"),
    /**
     * 数据操作错误定义
     */
    SUCCESS("2000", "成功!"),
    BODY_NOT_MATCH("4000","请求的数据格式不符!"),
    SIGNATURE_NOT_MATCH("4001","请求的数字签名不匹配!"),
    NOT_FOUND("4004", "未找到该资源!"),
    INTERNAL_SERVER_ERROR("5000", "服务器内部错误!"),
    SERVER_BUSY("5003","服务器正忙，请稍后再试!"),
    NOT_LOGIN("5003","未登陆!"),
    SERIALIZATION_ERROR("5005","序列化失败!"),
    PASSWORD_ERROR("5004","密码错误"),
    INSERT_ERROR("5006", "插入失败"),
    UPDATE_ERROR("5007", "更新失败"),
    ORDER_NOT_EXIST("5008", "工单不存在"),
    ORDER_CANT_UPDATE("5009", "工单状态不允许修改"),
    INSERT_PAYMENT_TABLE_ERROR("5010", "插入支付表失败"),
    PAYMENT_ORDER_NOT_EXIST("50011", "支付单不存在"),
    INVENTORY_NOT_ENOUGH("50012", "库存不足"),
    /**
     * 参数传递
     */
    EMPTY_PARAM("10001", "参数为空错误"),
    PARAM_ERROR("10002", "参数错误"),
    PARAM_LOST("10003", "参数缺失"),

    /**
     * 图片上传
     */
    UPLOAD_ERROR("90005","上传失败"),
    IMAGE_NEED_THREE("90006","至少上传三张图片"),
    IMAGE_DELETE_ERROR("90007","图片删除失败");

    private String code;
    private String msg;

    ExceptionEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }


    public String getMsg() {
        return msg;
    }

}
